home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
422mods.zip
/
FTAG3.422
< prev
next >
Wrap
Text File
|
1993-04-16
|
7KB
|
251 lines
Third and final part (FTAG.422)
Commander Riker #1 @7751
3Saturday, April 10, 1993 1 6:52 am
═══[ Step 8 ]═══════════════════════════════════════════════════════
Insert the following procedures in xfer.c or xferovl.c it doesn't matter,
the only difference is one is overlaied one isn't.... (no dah!)
/************* [Block copy from til I say STOP!] ***************/
char onek2(char *s)
{
char ch;
while (!strchr(s, ch = upcase(getkey())) && !hangup)
;
if (hangup)
ch = s[0];
if (ch!=13)
outchr(ch);
return(ch);
}
void backline(void)
{
int i;
ansic(0);
outchr(32);
for(i=wherex(); i>0; i--)
backspace();
}
void tag_files(void)
{
int i, done=0, had, fp, oh;
char s[161],s1[161],s2[81];
double t;
long fs;
if (x_only) {
file_ptr=0;
return;
}
if (in_tag==2) {
file_ptr=0;
return;
}
if (thisuser.sysstatus&sysstatus_no_tag) {
if (thisuser.sysstatus&sysstatus_pause_on_page)
pausescr();
file_ptr=0;
return;
}
oh=helpl;
helpl=43;
while ((!done) && (!hangup)) {
sprintf(s2,"(%s)-(%s) :",udir[curdir].keys,directories[udir[curdir].subnum].name);
prt(2,s2);
prt(2,"C)ontinue T)ag D)ownload V)iew S)top N)on-stop? "); /* Ver 2.2 */
switch (onek2("CTDVSN \r")) {
case 'S':
in_tag=3;
done=1;
break;
case 'N':
in_tag=2;
done=1;
break;
case 'T':
if (numbatch>=MAX_BATCH) {
backline();
prt(6,"No room left in batch queue.");
getkey();
backline();
break;
}
backline();
npr("Tag which file? ");
mpl(2);
input1(s,2,0,0);
i=atoi(s)-1;
if ((s[0]) && (i>=0) && (i<MAX_FILES) && (i<file_ptr)) {
if (check_batch_queue(file_index[i].filename)) {
backline();
prt(6,"That file is already in the batch queue.");
getkey();
backline();
break;
}
sprintf(s,"%s%s",directories[file_index[i].directory].path,
stripfn(file_index[i].filename));
fp=open(s,O_RDONLY | O_BINARY);
if (fp<0) {
backline();
prt(6,"File not there.");
getkey();
backline();
break;
}
fs=filelength(fp);
close(fp);
t=(12.656) / ((double) (modem_speed)) * ((double)(fs));
if (nsl()<=(batchtime + t)) {
backline();
prt(6,"Not enough time left in queue.");
getkey();
backline();
break;
} else {
batchtime += t;
strcpy(batch[numbatch].filename,file_index[i].filename);
batch[numbatch].dir=file_index[i].directory;
batch[numbatch].time=t;
batch[numbatch].sending=1;
batch[numbatch].len=fs;
numbatch++;
++numbatchdl;
backline();
prt(1,"File added to batch queue.");
getkey();
backline();
}
} else
backline();
break;
case 'D':
if (numbatchdl==0) {
backline();
prt(6,"Nothing in batch download queue.");
getkey();
backline();
break;
}
if (!ratio_ok()) {
backline();
prt(6,"Sorry, your ratio is too low.");
getkey();
backline();
break;
}
nl();
listbatch();
nl();
prt(5,"Hang up after transfer? ");
had=yn();
nl();
i=get_protocol(xf_down_batch);
if (i>0) {
if (i==4)
ymbatchdl(had);
else
dszbatchdl(had,externs[i-6].sendbatchfn,externs[i-6].description);
if (!had) {
nl();
npr("Your ratio is now: %-6.3f",ratio());
nl();
}
}
nl();
pausescr();
done=1;
break;
case 'V':
backline();
npr("View which file? ");
mpl(2);
input1(s,2,0,0);
i=atoi(s)-1;
if ((s[0]) && (i>=0) && (i<MAX_FILES) && (i<file_ptr)) {
sprintf(s1,"%s%s",directories[file_index[i].directory].path,
stripfn(file_index[i].filename));
if (!exist(s1)) {
backline();
prt(6,"File not there.");
getkey();
backline();
break;
}
get_arc_cmd(s,s1,0,"");
if (!okfn(stripfn(file_index[i].filename)))
s[0]=0;
if (s[0]!=0) {
nl();
in_tag=0;
do_external(s,1);
nl();
pausescr();
outstr("\f");
in_tag=1;
done=1;
} else {
backline();
prt(6,"Unknown archive.");
getkey();
backline();
break;
}
} else
backline();
break;
default:
done=1;
outstr("\f"); /* FTAG422 NOTE */
break;
}
}
backline();
helpl=oh;
file_ptr=0;
}
/**************[STOP!!!!!!]*******************/
/* NOTE */ ---- This line can be removed if you do not want it to clear
the screen each time it completes searching a section. This will not
effect how the mod works at all. I is meerly cosmetic.
This one is easy run "MAKE FCNS" and let it do the work... else if your
makeafobic just add the previous functions' declarations in fcns.h.
char onek2(char *s); /* FT422 */
void backline(void); /* FT422 */
void tag_files(void); /* FT422 */
═══[ Step 10 ]═══════════════════════════════════════════════════════
Due to the fact that you have modified the header files, I got some bad
news for you! Time for a complete re-compile! Type make and take in a
movie and dinner.
CLOSING:
If you have any problems with this mod, let me know. My address is as
follows.
Commander Riker / 1@7751 IceNET
Starfleet Command [ISB/ASV]
[717] 298-2131